// @ts-ignore
/* eslint-disable */
import request from "@/plugins/globalRequest";

/** 新增环境监测数据 POST /envMonitoring/addEnvMonitoring */
export async function addEnvMonitoringUsingPOST(
  body: API.EnvironmentalMonitoring,
  options?: { [key: string]: any },
) {
  return request<API.BaseResultString_>('/envMonitoring/addEnvMonitoring', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 根据id删除环境监测数据 DELETE /envMonitoring/deleteEnvMonitoringById/${param0} */
export async function deleteEnvMonitoringByIdUsingDELETE(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteEnvMonitoringByIdUsingDELETEParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResult>(`/envMonitoring/deleteEnvMonitoringById/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 批量删除环境监测数据 DELETE /envMonitoring/deleteEnvMonitoringList */
export async function deleteEnvMonitoringListUsingDELETE(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteEnvMonitoringListUsingDELETEParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResultString_>('/envMonitoring/deleteEnvMonitoringList', {
    method: 'DELETE',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 修改环境监测数据 PUT /envMonitoring/modifyEnvMonitoringById */
export async function modifyEnvMonitoringByIdUsingPUT(
  body: API.EnvironmentalMonitoring,
  options?: { [key: string]: any },
) {
  return request<API.BaseResultEnvironmentalMonitoring_>('/envMonitoring/modifyEnvMonitoringById', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 分页查询环境监测数据 GET /envMonitoring/queryAllEnvMonitoring */
export async function queryAllUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.queryAllUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResultPageQueryCondition_>('/envMonitoring/queryAllEnvMonitoring', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 根据id查询环境监测数据 GET /envMonitoring/queryEnvMonitoringById/${param0} */
export async function queryEnvMonitoringByIdUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.queryEnvMonitoringByIdUsingGETParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResultEnvironmentalMonitoring_>(
    `/envMonitoring/queryEnvMonitoringById/${param0}`,
    {
      method: 'GET',
      params: { ...queryParams },
      ...(options || {}),
    },
  );
}
